import { createSlice } from '@reduxjs/toolkit'

const initialState = {
  token:"",
  username:""

}

export const citySlice = createSlice({
  name: 'city',
  initialState,
  reducers: {
    Tooklt(state,action){
        state.token=action.payload
        console.log(action.payload);
        
    },
    User(state,action){
        state.username=action.payload
        console.log(action.payload);
        
    }
  },
})

// Action creators are generated for each case reducer function
export const {Tooklt,User} = citySlice.actions

export default citySlice.reducer